Yet more PAE fixes, this time in the paravirt drivers.
authoriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Thu, 8 Sep 2005 01:00:04 +0000 (01:00 +0000)
committeriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Thu, 8 Sep 2005 01:00:04 +0000 (01:00 +0000)
Signed-off-by: ian@xensource.com
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c

index a507f66d939c5f30fee1450ce89279bcafe857e4..8226222db41c8381a9f3b8b9f22b5540a5ad245e 100644 (file)
@@ -182,7 +182,7 @@ int blkif_ioctl(struct inode *inode, struct file *filep,
 static int blkif_queue_request(struct request *req)
 {
        struct blkfront_info *info = req->rq_disk->private_data;
-       unsigned long buffer_ma;
+       unsigned long buffer_mfn;
        blkif_request_t *ring_req;
        struct bio *bio;
        struct bio_vec *bvec;
@@ -221,7 +221,7 @@ static int blkif_queue_request(struct request *req)
                bio_for_each_segment (bvec, bio, idx) {
                        BUG_ON(ring_req->nr_segments
                               == BLKIF_MAX_SEGMENTS_PER_REQUEST);
-                       buffer_ma = page_to_phys(bvec->bv_page);
+                       buffer_mfn = page_to_phys(bvec->bv_page) >> PAGE_SHIFT;
                        fsect = bvec->bv_offset >> 9;
                        lsect = fsect + (bvec->bv_len >> 9) - 1;
                        /* install a grant reference. */
@@ -231,11 +231,11 @@ static int blkif_queue_request(struct request *req)
                        gnttab_grant_foreign_access_ref(
                                ref,
                                info->backend_id,
-                               buffer_ma >> PAGE_SHIFT,
+                               buffer_mfn,
                                rq_data_dir(req) );
 
                        info->shadow[id].frame[ring_req->nr_segments] =
-                               buffer_ma >> PAGE_SHIFT;
+                               buffer_mfn;
 
                        ring_req->frame_and_sects[ring_req->nr_segments] =
                                blkif_fas_from_gref(ref, fsect, lsect);
index 32ceb5f0b9d5afdfe3754c7a594dd4a45e7cd198..40eac7b49172b7b556098e7e302a72ea129dc923 100644 (file)
@@ -297,7 +297,7 @@ static void net_rx_action(unsigned long unused)
         mmuext->mfn = old_mfn;
         mmuext++;
 #endif
-        mmu->ptr = (new_mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
+        mmu->ptr = ((unsigned long long)new_mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
         mmu->val = __pa(vdata) >> PAGE_SHIFT;  
         mmu++;
 
index 45755083deb231fabd13f8a82c03e82863a129b9..e31434ac12f4109db31a38e92deff5ced8334f44 100644 (file)
@@ -618,7 +618,7 @@ static int netif_poll(struct net_device *dev, int *pbudget)
 
         /* Remap the page. */
 #ifdef CONFIG_XEN_NETDEV_GRANT
-        mmu->ptr = mfn << PAGE_SHIFT | MMU_MACHPHYS_UPDATE;
+        mmu->ptr = ((unsigned long long)mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE;
 #else
         mmu->ptr  = (rx->addr & PAGE_MASK) | MMU_MACHPHYS_UPDATE;
 #endif